/**
 * @author guojiteng
 */
import request from '@/utils/request'

/**
 * 获取列表
 */
export function fetchList(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/queryPage',
    method: 'POST',
    data
  })
}
/**
 * 删除
 */
export function deleteSubject(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/deleteById',
    method: 'POST',
    data
  })
}
/**
 * 获取分类
 */
export function getClassifyTree(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/learnClassify/getClassifyTree',
    method: 'POST',
    data
  })
}
/**
 * 编辑
 */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/update',
    method: 'POST',
    data
  })
}
/**
 * 获取详情
 */
export function get(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/get',
    method: 'POST',
    data
  })
}
/**
 * 批量删除
 */
export function batchDelet(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/deleteByIds',
    method: 'POST',
    data
  })
}
/**
 * 批量发布
 */
export function batchPublish(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/updateBatch',
    method: 'POST',
    data
  })
}
/**
 * 批量设置分类
 */
export function batchSetted(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/updateClassify',
    method: 'POST',
    data
  })
}
/**
 * 查看课件视频
 */
export function getKtyVideoPath(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/getKtyVideoPath',
    method: 'POST',
    data
  })
}
